import Layout from '../views/layout/Layout'
var AppComponent = {
  template: '<router-view/>'
}
const _import = require('./_import_' + process.env.NODE_ENV);
export default {
  path: '/merchant/sys',
  component: Layout,
  name: 'merchantSys',
  meta: {title: '商家后台管理', icon: 'icon'},
  children: [
    {
      path: '/config',
      component: AppComponent,
      name: 'config',
      meta: {
        title: '商品配置'
      },
      children: [
        {
          path: 'brand/list',
          component: _import('merchantManageSys/config/brand/list'),
          name: 'brandConfigList',
          meta: {
            title: '品牌维护',
            buttons: {
              search: { label: '查询', enabled: true },
              add:{label: '新建品牌', enabled: true},
              edit:{label: '编辑', enabled: true},
              auth:{label: '授权', enabled: true}
            }
          }
        },
        {
          path: 'brand/auth/list/:id',
          component: _import('merchantManageSys/config/brand/authList'),
          name: 'brandAuthList',
          meta: {
            title: '品牌授权列表',
            buttons:{
              add:{label: '新建授权', enabled: true},
              cancelauth:{label: '解除授权', enabled: true}
            }
        },
          hidden: true,
          props: true
        },
        {
          path: 'color/list',
          component: _import('merchantManageSys/config/color/list'),
          name: 'colorConfigList',
          meta: {
            title: '颜色维护',
            buttons: {
              export: { label: '导出', enabled: true },
              add: { label: '新建颜色', enabled: true },
              edit: { label: '编辑', enabled: true },
              delete: { label: '删除', enabled: true }
            }
          }
        },
        {
          path: 'spec/list',
          component: _import('merchantManageSys/config/spec/list'),
          name: 'sepcConfigList',
          meta: {
            title: '规格维护',
            buttons: {
              export: { label: '导出', enabled: true },
              add: { label: '新建颜色', enabled: true },
              edit: { label: '编辑', enabled: true },
              delete: { label: '删除', enabled: true }
            }
          }
        }
      ]
    },
    {
      path: '/merchant',
      component: AppComponent,
      name: 'merchant',
      meta: {
        title: '商家管理'
      },
      children: [
        {
          path: 'apply/list',
          component: _import('merchantManageSys/merchant/apply/list'),
          name: 'applyList',
          meta: {
            title: '入驻申请',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'modify/list',
          component: _import('merchantManageSys/merchant/modify/list'),
          name: 'modifyList',
          meta: {
            title: '档案变更',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'base/list',
          component: _import('merchantManageSys/merchant/base/list'),
          name: 'baseList',
          meta: {
            title: '基础信息',
            buttons: {
              export: { label: '导出', enabled: true },
              view: { label: '查看', enabled: true },
              edit: { label: '修改', enabled: true }
            }
          }
        },
        {
          path: 'apply/detail/:processId',
          component: _import('merchantManageSys/merchant/detail/index'),
          name: 'applyDetail',
          meta: {title: '商家详情', index: '/merchant/apply/list'},
          hidden: true,
          props: true
        },
        {
          path: 'base/detail/:processId',
          component: _import('merchantManageSys/merchant/detail/index'),
          name: 'basetDetail',
          meta: {title: '商家详情', index: '/merchant/base/list'},
          hidden: true,
          props: true
        },
        {
          path: 'modify/detail/:processId',
          component: _import('merchantManageSys/merchant/detail/index'),
          name: 'modifyDetail',
          meta: {title: '商家详情', index: '/merchant/modify/list'},
          hidden: true,
          props: true
        }
      ]
    },
    {
      path: '/goods',
      component: AppComponent,
      name: 'goods',
      meta: {
        title: '商品管理'
      },
      children: [
        {
          path: 'base/list',
          component: _import('merchantManageSys/goods/base/list'),
          name: 'goodsBaseList',
          meta: {
            title: '基础信息',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'base/detail/:id',
          component: _import('merchantManageSys/goods/base/detail'),
          name: 'goodsBaseDetail',
          meta: {title: '商品详情', index: '/goods/base/list'},
          hidden: true,
          props: true
        },
        {
          path: 'base/modify/:processId',
          component: _import('merchantManageSys/goods/base/modify'),
          name: 'goodsBaseModifyDetail',
          meta: {title: '商品编辑详情', index: '/goods/base/list'},
          hidden: true,
          props: true
        },
        {
          path: 'audit/detail/:id',
          component: _import('merchantManageSys/goods/audit/detail'),
          name: 'goodsAuditDetail',
          meta: {title: '商品审核详情', index: '/goods/audit/list'},
          hidden: true,
          props: true
        },
        {
          path: 'audit/list',
          component: _import('merchantManageSys/goods/audit/list'),
          name: 'goodsAuditList',
          meta: {
            title: '审核列表',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        }
      ]
    },
    {
      path: '/price',
      component: AppComponent,
      name: 'price',
      meta: {
        title: '价格管理'
      },
      children: [
        {
          path: 'list',
          component: _import('merchantManageSys/price/list'),
          name: 'priceList',
          meta: {
            title: '调价申请',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'detail/:id',
          component: _import('merchantManageSys/price/detail'),
          name: 'priceDetail',
          meta: {title: '调价详情', index: '/price/list'},
          hidden: true,
          props: true
        }
      ]
    },
    {
      path: '/settle',
      component: AppComponent,
      name: 'settle',
      meta: {
        title: '结算管理'
      },
      children: [
        {
          path: 'list',
          component: _import('merchantManageSys/settle/list'),
          name: 'settleList',
          meta: {
            title: '结算单列表',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'detail/:settleNo',
          component: _import('merchantManageSys/settle/detail'),
          name: 'priceDetail',
          meta: {title: '结算单详情', index: '/settle/list'},
          hidden: true,
          props: true
        },
        {
          path: 'payment/list',
          component: _import('merchantManageSys/settle/payment/list'),
          name: 'paymentList',
          meta: {
            title: '付款单列表',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'payment/detail/:settleNo/:accountId',
          component: _import('merchantManageSys/settle/payment/detail'),
          name: 'paymentDetail',
          meta: {title: '付款单详情', index: '/settle/payment/list'},
          hidden: true,
          props: true
        },
        {
          path: 'review/list',
          component: _import('merchantManageSys/settle/review/list'),
          name: 'reviewList',
          meta: {
            title: '复核单列表',
            buttons: {
              view: { label: '查看', enabled: true }
            }
          }
        },
        {
          path: 'review/detail/:settleNo',
          component: _import('merchantManageSys/settle/review/detail'),
          name: 'paymentDetail',
          meta: {title: '付款单详情', index: '/settle/review/list'},
          hidden: true,
          props: true
        }
      ]
    }
  ]
}
